﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Markup;

namespace CommunitySystem.Elements
{
    [ContentProperty("Content")]
    public partial class GlassFrame : UserControl
    {
        public static readonly DependencyProperty FrameLengthProperty =
            DependencyProperty.Register("FrameLength", typeof(Thickness), typeof(GlassFrame), new PropertyMetadata(new Thickness(8)));

        public static readonly DependencyProperty FrameCornerRadiusProperty =
            DependencyProperty.Register("FrameCornerRadius", typeof(CornerRadius), typeof(GlassFrame), new PropertyMetadata(new CornerRadius(6)));
        
        public Thickness FrameLength
        {
            get { return (Thickness)GetValue(FrameLengthProperty); }
            set { SetValue(FrameLengthProperty, value); }
        }

        public CornerRadius FrameCornerRadius
        {
            get { return (CornerRadius)GetValue(FrameCornerRadiusProperty); }
            set { SetValue(FrameCornerRadiusProperty, value); }
        }

        public GlassFrame()
        {
            InitializeComponent();
            LayoutRoot.DataContext = this;
        }

        public object Content
        {
            get { return contentHolder.Content; }
            set { contentHolder.Content = value; }
        }
    }
}
